# Author：wgw
import requests,json
import pandas as pd

def all(key, city,output='JSON', extensions='base'):
    """高德天气查询API：https://lbs.amap.com/api/webservice/guide/api/weatherinfo"""
    weather_url = 'https://restapi.amap.com/v3/weather/weatherInfo?parameters'
    params = {
        "key": key,
        "city": city,
        "extensions": extensions,
        "output": "JSON"
    }
    response = requests.get(weather_url, params)
    results = response.json()['lives'][0]
    return results


